jQuery(document).ready(function(){		
	jQuery('.paginate_button').click(function(){				
		showAjaxEffect();				
	});	
	jQuery('.imagelist .btn_flag').click(function(){
		var parent = jQuery(this).parents('li');
		var title = jQuery(this).attr("rel");
		var c = confirm('Channel \"' + title + '\" will be the first one in home page ?');
		if(c) {
			var id = jQuery(this).attr("href");			
			jQuery.get("/admin/channel/process", {id: id, action: "bump"}, function(data) {				
				location.reload();
			});					
		}
		return false;
	});
	//delete image in grid list
	jQuery('.imagelist .btn_trash').click(function(){
		var parent = jQuery(this).parents('li');
		var title = jQuery(this).attr("rel");
		var c = confirm('Are you sure want to delete \"' + title + '\" channel ?');
		if(c) {
			var id = jQuery(this).attr("href");			
			jQuery.get("/admin/channel/process", {id: id, action: "delete"}, function(data) {				
				parent.hide('explode',300);
			});					
		}
		return false;
	});	
});

